<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Js RegExp</title>
</head>
<body>
	<script type="text/javascript" src="./js/reg.js"></script>
	<script type="text/javascript">
	var reg = "(.)+c$"
	var source = "abcddsdc";
    console.log(regexpTest(reg,source));
    
    console.log(regexpTest('.{2,3}','a'))
    console.log(regexSimpleTest(/^[1-9]+$|^0$/i,'abc'));
    console.log(regexSimpleTest(/^[1-9]+$|^0$/i,'123'));
    console.log(regexSimpleTest(/^[1-9]+$|^0$/i,'0'));
    console.log(regexSimpleTest(/^[1-9]+$|^0$/i,'01'));
    console.log(regexSimpleTest(/^[1-9]+|^0$/i,'10'));
    console.log(regexSimpleTest(/^[1-9]+|^0$/i,'01'));
    console.log(regexSimpleTest(/^[1-9]+\d$|^0$/i,'1a'));
    console.log(regexSimpleTest(/^([1-9]+\d$)|^0$/i,'1a'));
    console.log(regexSimpleTest(/a/g,'abd'));
    console.log(regexExec(/a/g,'A Novel View of the World Travel without leaving your armchair with Google Book Search. Whenever you\'re looking at a book, click on the \"About this book\" tab, and scroll to the bottom of the page to see the \"Places mentioned in this book\" section\.Take a look at these jet-set page-turners:Around the World in 80 Days War and Peace'));
    console.log(regexExec(/a/g,'aaabbbcccaaa'));
    document.write(regexExec(/a/g,'aaabbbcccaaa'));
</script>

</body>
</html>